﻿using System;
using System.Runtime.InteropServices;

namespace Vtron.HipcConfigurationTools.Domain
{
    /// <summary>
    /// osd配置的请求
    /// </summary>
    /// <remarks>
    /// #define OSD_MAX_NUM    (48)
    /// 
    /// typedef  struct
    /// {
    ///     T_HIPC_NET_HEADER	   head;
    ///     Uint8    channel;
    ///     Uint8    enable;  //  0:close  1:open
    ///     Uint8    ipEnable;   //是否显示IP地址
    ///     Uint8    timeEnable; //是否显示当前时间
    ///     Uint8    color;           //字体颜色
    ///     Uint8    context[OSD_MAX_NUM]; //用户自定义字符串
    /// } T_HIPC_OSD_CONFIG_REQ;
    /// </remarks>
    [Serializable]
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct T_HIPC_OSD_CONFIG_REQ
    {
        #region Fields

        /// <summary>
        /// 网络协议数据头
        /// </summary>
        public T_HIPC_NET_HEADER head;

        /// <summary>
        /// 通道号
        /// </summary>
        public byte channel;

        /// <summary>
        /// enable
        /// </summary>
        /// <remarks>
        /// 0:close  1:open
        /// </remarks>
        public byte enable;

        /// <summary>
        /// 是否显示IP地址
        /// </summary>
        public byte ipEnable;

        /// <summary>
        /// 是否显示当前时间
        /// </summary>
        public byte timeEnable;

        /// <summary>
        /// 字体颜色
        /// </summary>
        public byte color;

        /// <summary>
        /// 用户自定义字符串
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)]
        public byte[] context;

        #endregion
    }
}
